package com.xuxin.baby.contract;

import com.xuxin.baby.bean.AuthenticateBean;
import com.xuxin.baby.bean.BaseBean;
import com.xuxin.baby.bean.LoginBean;
import com.xuxin.baby.bean.TenantIdBean;
import com.xuxin.baby.presenter.LoginPresenter;

/**
 * Created by xu_xin
 * Created on 2020/10/22 0022
 * 验证码登录
 */
public interface LoginContract {

    interface Model {

        void sendCode(LoginPresenter presenter, String phone, String code);

        void getTenantId(LoginPresenter presenter, String tenancyName);

        void authenticate(LoginPresenter presenter, String tenantId, String userNameOrEmailAddress, String password);

        void login(LoginPresenter presenter, String tenantId, String token, String phone);

        void getInfo(LoginPresenter presenter, String tenantId, String token);
    }

    interface View extends BaseContract.view {

        void onSuccess(BaseBean baseBean);

        void onSuccess(TenantIdBean tenantIdBean);

        void onSuccess(AuthenticateBean authenticateBean);

        void onSuccess(LoginBean loginBean);
    }

    interface Presenter extends BaseContract.presenter {

        void sendCode(String phone, String code);

        void getTenantId(String tenancyName);

        void authenticate(String tenantId, String userNameOrEmailAddress, String password);

        void login(String tenantId, String token, String phone);

        void getInfo(String tenantId, String token);

        void onSuccess(BaseBean baseBean);

        void onSuccess(TenantIdBean tenantIdBean);

        void onSuccess(AuthenticateBean authenticateBean);

        void onSuccess(LoginBean loginBean);
    }
}